package chain;


// Handler是一个抽象的节点, 在程序初始化时, 需要将节点串起来
public abstract class Handler {
    protected Handler nextHandler;

    public void setNextHandler(Handler nextHandler) {
        this.nextHandler = nextHandler;
    }

    // 该handler处理当前请求
    public abstract void handlePaymentRequest(PaymentRequest request) throws Exception;
}

